package de.rwth.dbis.ugnm.entity;

import javax.persistence.GeneratedValue;
import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@Table(name = "ACHIEVEMENT")
@NamedQueries({ 
	@NamedQuery(name = "Achievement.findAll", query = "SELECT a FROM Achievement a"),
	@NamedQuery(name = "Achievement.findAchievement", query = "SELECT a FROM Achievement a where a.id=:id"),
	@NamedQuery(name = "Achievement.findAchievementName", query = "SELECT a FROM Achievement a where a.name=:name")
})
@XmlRootElement
public class Achievement {
	
	@Id
	@GeneratedValue
	@Column(name = "ID")
	private String id;
	
	@Column(name = "IMGURL", nullable = false)
	private String imgUrl;
	
	@Column(name = "NAME", nullable = false)
	private String name;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}
